-- equip_damage
-- created by zhuangsl
-- 装备附带的技能伤害+n%

return {
    apply = function(prop, baseValue)
        return baseValue + math.modf(baseValue * prop[3] / 1000);
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;

        local skillId = tonumber(prop[2]);
        -- 技能对应的装备
        local map = {
            [180] = 8506,       -- 精灵王之弩
            [181] = 8507,       -- 传奇之弩
        };

        local equipId = map[skillId];
        local name = ItemM.query(equipId, "name");
        local value = math.modf(prop[3] / 10);

        desc = string.gsub(desc, "{0}", name);
        desc = string.gsub(desc, "{1}", value);

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};